package com.athena.config;

import cn.hutool.core.io.resource.ClassPathResource;
import org.ho.yaml.Yaml;

import java.util.Map;

public class InitConfig {

    private static Map<String,Map> config=readDefult();

    public static String base_packge=getBasePackge();

    public static Map<String,Map> readDefult() {
        ClassPathResource resource = new ClassPathResource("default-app.yml");
        Map<String,Map> obj = (Map<String, Map>) Yaml.load(resource.getStream());
        return obj;
    }

    public static String getBasePackge() {
        return config.get("athena").get("scanerBasePackge").toString();
    }
}
